package com.study.d028shape3d;

import java.rmi.activation.ActivationInstantiator;

import javafx.application.Application;
import javafx.scene.PerspectiveCamera;
import javafx.scene.Scene;
import javafx.scene.SceneAntialiasing;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.shape.Box;
import javafx.scene.shape.Cylinder;
import javafx.scene.shape.Sphere;
import javafx.stage.Stage;

/**球体
*@description
*@author xtayhame
*date 2020年3月21日
*version
*since v1.0
*/
public class SphereMain extends Application{
	public static void main(String[] args) {
		launch(args);
	}
	@Override
	public void start(Stage stage) throws Exception {
		AnchorPane anchorPane = new AnchorPane();
		HBox box = new HBox(40);
		for(int i=0;i<5;i++){
			Sphere b1 = new Sphere(50, 200);
			box.getChildren().add(b1);
		}
		anchorPane.getChildren().add(box);
		Scene scene = new Scene(anchorPane, 600, 400, true);
		//添加摄像机
		scene.setCamera(new PerspectiveCamera());
		stage.setScene(scene);
		stage.centerOnScreen();
		stage.show();
	}
}
